package tiantian_ssm;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import edu.gdut.tiantian.entity.Order;
import edu.gdut.tiantian.service.Impl.OrderService;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:bean.xml")
public class OrderTester {
	@Autowired
	private OrderService orderDao;
	
	@Test
	public void testFindById() {
		String orderId = "F3A29271DE8E4526BECEA606BEBB2FD6";
		Order order = orderDao.findByOrderId(orderId);
		System.out.println(order);
	}
	
	@Test
	public void testAdd() {
		Order order = new Order();
		order.setOrderId("21234asd");
		order.setRecName("asd");
		order.setRecAddress("asd");
		order.setRecPhone("110");
	}
}
